<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html>
<head>
<title>Visual Basic language</title>
<link rel="stylesheet" href="/cfg/format.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="Visual Basic, learn Visual Basic, tutorial, programming language">
<meta name="description" content="This part of the Visual Basic tutorial describes 
the Visual Basic language.">
<meta name="language" content="en">
<meta name="author" content="Jan Bodnar">
<meta name="distribution" content="global">

<script type="text/javascript" src="/lib/jquery.js"></script>
<script type="text/javascript" src="/lib/common.js"></script>

</head>

<body>

<div class="container">

<div id="wide_ad" class="ltow">
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* 160x600, August 2011 */
google_ad_slot = "2484182563";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>


<div class="content">

<a href="/" title="Home">Home</a>&nbsp;
<a href="..">Contents</a>


<h1>Visual Basic</h1>

<p>
In this part of the Visual Basic tutorial, we will introduce the 
Visual Basic programming language. 
</p>


<h2>Goal</h2>

<p>
The goal of this tutorial is to get you started with the Visual Basic 
programming language. The tutorial covers the core of the Visual Basic language. 
Variables, arrays, control structures and other core features. 
It does not cover graphical interface development. 
</p>

<div class="center"> 
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* horizontal */
google_ad_slot = "1734478269";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script> 
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script> 
</div>

<h2>Visual Basic</h2>

<p>
The Visual Basic programming language is a high-level programming language for the
.NET Framework. It is a very popular language. Currently, it is one of the top 10
popular languages in the world. It was created for the Windows
platform. The Mono project has created a clone for the Linux and Mac platforms. 
The Visual Basic was created to be easy to learn. It was derived from the family of
BASIC languages. It is an object oriented, compiled language. The source code
is compiled into executable (.exe) files, which are executed by the .Net platform.
Visual Basic underwent many changes since its initial release. It was heavily
criticized for its poor design. Many of the shortcomings were fixed. 
Some of the not so good relics still remain in
the syntax. Once considered a simpler cousin to C#, over the years it became
a full featured advanced programming language. Its popularity rose and declined.
</p>



<h2>Programming languages</h2>

<p>
There are currently several widely used programming languages. The following list is based on the 
<a href="http://www.tiobe.com/tpci.htm">TIOBE</a> Programming Community Index. 
The numbers are from August 2010. 
Note that these figures are only illustrative. No one knows the exact numbers. 
</p>

<table width="400">
<tbody><tr>
<th>Position</th>
<th>Language</th>
<th>Ratings</th>
</tr>
<tr>
<td>1</td><td>Java</td><td>18%</td>
</tr>

<tr class="gray">
<td>2</td><td>C</td><td>17.9%</td>
</tr>
<tr>
<td>3</td><td>C++</td><td>9.7%</td>
</tr>
<tr class="gray">
<td>4</td><td>PHP</td><td>9.2%</td>
</tr>
<tr>
<td>5</td><td>Visual Basic</td><td>5.4%</td>
</tr>
<tr class="gray">
<td>6</td><td>C#</td><td>5%</td>
</tr>
<tr>
<td>7</td><td>Python</td><td>4.2%</td>

</tr>
<tr class="gray">
<td>8</td><td>Perl</td><td>3.4%</td>
</tr>
<tr>
<td>9</td><td>Objective C</td><td>3.2%</td>
</tr>
<tr class="gray">
<td>10</td><td>Delphi</td><td>2.4%</td>
</tr>

</tbody>
</table>

<p>
Java is the most widely used programming language. Java excels in 
creating portable mobile applications, programming various appliances 
and in creating enterprise applications. Every fourth application 
is programmed in C/C++. They are mainly used for creating operating 
systems and various desktop applications. C/C++ are the most widely used system 
programming languages. Most famous desktop applications were created in C++. 
May it be MS Office, Macromedia Flash, Adobe Photoshop or 3D Max. 
These two languages also dominate the game programming business. 
</p>

<p>
PHP dominates over the Web. While Java is used mainly by large organizations, 
PHP is used by smaller companies and individuals. 
</p>

<p>
Visual Basic represents the popularity of rapid application development 
and the dominance of Microsoft. 
</p>

<p>
The C# was planned to be the next big language. It should compete 
mainly with Java and C/C++ languages.
</p>

<p>
Python and PERL are popular scripting languages and close competitors. 
</p>

<p>
The popularity of the Objective C stems from Mac and their
innovative appliances.
</p>

<p>
Deplhi is a popular RAD development tool.
</p>


<h2>Compiling</h2>

<p>
Examples in this tutorial were tested on Linux and Windows XP. On Linux
I have used the Mono Visual Basic compiler. On Windows, I have used the
Visual Basic 2008 Express Edition.
</p>

<p>
On Linux, we need to have installed the Mono Visual Basic compiler. 
It is called <b>vbnc</b>.
</p>

<pre>
$ vbnc simple.vb 
$ ./simple.exe 
This is Visual Basic
</pre>

<p>
We compile and run a simple Visual Basic program on Linux. 
</p>

<p>
Under Windows, create a new project. Select File/New Project
or click Ctrl+N. Select Console application. 
</p>

<img src="/img/lang/vb/console.png" alt="Console application">
<div class="figure">Figure: Console application</div>

<p>
To run an example, click <b>Ctrl + F5</b>. 
</p>


<h2>Sources</h2>

<p>
The following three sources were used to create this tutorial:
</p>

<ul>
<li><a href="http://www.msdn.com">msdn.com</a></li>
<li><a href="http://www.wikipedia.org">wikipedia.org</a></li>
<li>Visual Basic Language specification</li>
</ul>


<p>
In this part of the Visual Basic tutorial, we have introduced the Visual Basic language. 
</p>

<div class="center"> 
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* horizontal */
google_ad_slot = "1734478269";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script> 
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script> 
</div>
<br>

<div class="botNav, center">
<span class="botNavItem"><a href="/">Home</a></span> ‡ <span class="botNavItem"><a href="..">Contents</a></span> ‡
<span class="botNavItem"><a href="#">Top of Page</a></span>
</div>


<div class="footer">
<div class="signature">
<a href="/">ZetCode</a> last modified September 24, 2010  <span class="copyright">&copy; 2007 - 2013 Jan Bodnar</span>
</div>
</div>

</div> <!-- content -->

</div> <!-- container -->

</body>
</html>

